<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试页面</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>

<div id="app">
    <div>
        <el-divider></el-divider>
        <el-checkbox label="3.点击按钮会出现一张图片,再点一次会消失"></el-checkbox>
        <el-button type="danger" @click="img">
            <div v-if='!imgFlag'>显示图片</div>
            <div v-if='imgFlag'>取消显示</div>
        </el-button>
        <el-image src="https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg" v-if='imgFlag'></el-image>
        <el-divider></el-divider>
    </div>
</div>
<script src="js/vue.js"></script>
<script src="js/axios.js"></script>
<script src="https://unpkg.com/element-ui@2.15.1/lib/index.js"></script>
<script>
    new Vue({
        el: '#app',
        data() {
            return {
                imgFlag: false,
            }
        },
        methods: {
            img() {
                this.imgFlag = !this.imgFlag
            }
        }
    })
</script>
</body>
</html>